<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>制造</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 
 <link rel="stylesheet" href="../../res/layuis/css/layui.css">
   <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
   <script type="text/javascript" src="../../res/layuis/layui.js" charset="utf-8"></script>
  
</head>
<body>
<input type="hidden" id="manufactureText" style="width: 100%;height: 30px;">
<input type="hidden" id="noNumberText" style="width: 100%;height: 30px;">
<div class="demoTable" style="margin-top: 10px;">
 
    <div class="x-body">
    <div class="layui-input-inline">
      <form class="layui-form" action="">
      
          <div class="layui-input-inline" style="width:224px;">
		      <select name="muId" lay-filter="aihao" id="muId" lay-search >
		       	<option value="">请选择乐器</option>
		      </select>
   		 </div>
        
      </form>
      </div>
       <div class="layui-input-inline">
      	<button class="layui-btn" id="search" data-type="reload" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
      </div>
       <div class="layui-input-inline" style="margin-left: 20px;">
         <input type="button" class="layui-btn" id="submitDd"  value="加入制造">
      </div>
<table class="layui-table"  id="manufacture" lay-filter="demo" >
  
  
</table>

			
</div>
</div>
 <div class="layui-form layui-border-box layui-table-view"
				lay-filter="LAY-table-2" style="">
				<div class="layui-table-box">
					<div class="layui-table-header">
						<table class="layui-table" cellspacing="0" cellpadding="0"
							border="0">
							<thead>
								<tr>
									<th data-field="pdId" style="display: none;"><div
											class="layui-table-cell">
											<span>生产计划明细ID</span>
										</div></th>
									<th data-field="muId" style="display: none;"><div
											class="layui-table-cell">
											<span>乐器ID</span>
										</div></th>
									<th data-field="muName"><div
											class="layui-table-cell" style="width: 130px;">
											<span>乐器名称</span>
										</div></th>
									<th data-field="pdNumber"><div
											class="layui-table-cell" style="width: 130px;">
											<span>计划任务</span>
										</div></th>
									<th data-field="mfComplete"><div
											class="layui-table-cell" style="width: 130px;">
											<span>是否完成</span>
										</div></th>
									<th data-field="completed"><div
											class="layui-table-cell" style="width: 130px;">
											<span>已完成部分</span>
										</div></th>
									<th data-field="oldNumber"><div
											class="layui-table-cell" style="display: none;">
										</div></th>
									<th data-field="completeNumber"><div
											class="layui-table-cell" style="width: 130px;">
											<span>完成数量</span>
										</div></th>
									<th data-field="mfNoComplete"><div
											class="layui-table-cell" style="width: 130px;">
											<span>未完成部分</span>
										</div></th>
									<th data-field="mfNumber"><div
											class="layui-table-cell" style="width: 100px;">
											<span>制造次数</span>
										</div></th>
								</tr>
							</thead>
						</table>
					</div>
					<div id="divTbody">
					 	<!-- <div class="layui-table-body layui-table-main">
						<table class="layui-table" cellspacing="0" cellpadding="0"
							border="0">
							<tbody>
								<tr data-index="0" class="">
									<td data-field="entName"><div
											class="layui-table-cell laytable-cell-2-entName">11</div></td>
									<td data-field="drugName"><div
											class="layui-table-cell laytable-cell-2-drugName">肾宝片</div></td>
									<td data-field="mpTask"><div
											class="layui-table-cell laytable-cell-2-mpTask">1</div></td>
									<td data-field="mpFinished" data-content="未完成"><div
											class="layui-table-cell laytable-cell-2-mpFinished">
											<div class="layui-inline">
												<input class="layui-input layui-disabled"
													readonly="readonly"
													style="border: none; padding-bottom: 8px;"
													name="mpFinished" id="96f5220b7ddd45e69c3946dcabe749d1"
													autocomplete="off" placeholder="是否完成" value="未完成""="">
											</div>
										</div></td>
									<td data-field="mpUnfinished" data-content="0"><div
											class="layui-table-cell laytable-cell-2-mpUnfinished">
											<div class="layui-inline">
												<input class="layui-input" maxlength="5"
													style="border: none; padding-bottom: 8px;"
													name="mpUnfinished" id="e488fbd88f314d40bccad873c8fae387"
													autocomplete="off" placeholder="输入完成数量" value="0"
													onkeyup="clearNoNum(this);">
											</div>
										</div></td>
									<td data-field="mpScheme" data-content="继续制造"><div
											class="layui-table-cell laytable-cell-2-mpScheme">
											<div class="layui-inline">
												<input class="layui-input layui-disabled"
													readonly="readonly"
													style="border: none; padding-bottom: 8px;" name="mpScheme"
													id="a0131f7349454737859ea0ce8d59b374" autocomplete="off"
													placeholder="处理方案" value="继续制造""="">
											</div>
										</div></td>
									<td data-field="sort"><div
											class="layui-table-cell laytable-cell-2-sort">1</div></td>
								</tr>
							</tbody>
						</table>
					</div> -->
					</div>
				</div>
 
			</div>
 
 
 <script type="text/javascript">
 /**
  * 从地址栏传值的代码
  * @param param
  * @returns
  */
 function getParameter(param){
 	var query = window.location.search;
 	var iLen = param.length;
 	var iStart = query.indexOf(param);
 	if (iStart == -1)
 		return "";
 	iStart += iLen + 1;
 	var iEnd = query.indexOf("&", iStart);
 	if (iEnd == -1)
 		return query.substring(iStart);
 	return query.substring(iStart, iEnd);
 }
 
 
 
 
layui.use('table',function(){
	  var table = layui.table;
	  var form = layui.form;
	  
	  table.render({
		    elem: '#manufacture'
		    	,page: true
		    ,url:'../../listenManufacture/findByProdId.action'
 
		    ,cols: [[
		    	{field:'mfId', align:'center'}
			      ,{field:'pdId', align:'center'}
			      ,{field:'muId', align:'center'}
			      ,{field:'stringMfTime',title: '制造时间', align:'center'}
			      ,{field:'muName',title: '乐器名称', align:'center'}
			      ,{field:'pdNumber',title: '任务计划', align:'center'}
			      ,{field:'mfFinish',title: '制造数量', align:'center'}
			      ,{field:'mfComplete',title: '是否完成', align:'center',templet:'#mfCompletes'}
			      ,{field:'mfNoComplete',title: '未完成部分', align:'center'}
			      ,{field:'mfNumber',title: '制造次数', align:'center'}
		    ]],done: function (res, curr, count) {
		    	$("[data-field='mfId']").css('display','none');
	            $("[data-field='pdId']").css('display','none');
	            $("[data-field='muId']").css('display','none');
		    }
		  });
	  
	 
});


</script>
<script type="text/html" id="mfCompletes">
{{# if(d.mfComplete == 0) { }}
     <div>未完成</div>
 	 {{# } else if(d.mfComplete == 1){ }}
    <div>已完成</div>
{{# }}}
</script>
<script type="text/html" id="completeNumbers">
 <input type="text" name="title" id="number{{d.pdId}}" required lay-verify="required" value="0" autocomplete="off" class="layui-input" style="border:0px;" onkeyup="input(this,event)">
</script>
 <script type="text/html" id="completeNumber">
 <input type="text" name="title" id="number{{d.pdId}}" required lay-verify="required" value="0" autocomplete="off" class="layui-input" style="border:0px;" onkeyup="input(this,event)">
</script>

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript" src="../../res/js/manufacture/manufacture.js"></script>
</body>
</html>